/**
 * 
 */
package com.qccx.ueuo.selfguide.service.impl;

import java.sql.SQLException;
import java.util.List;

import com.qccx.ueuo.selfguide.dao.UserDao;
import com.qccx.ueuo.selfguide.entity.User;
import com.qccx.ueuo.selfguide.service.UserService;

/**
 * 功能介绍:处理数据库业务
 * @author rainJohn
 *
 * @date [2013-4-27]
 */
public class UserServiceImpl implements UserService
{

    private UserDao userDao;

    /* (non-Javadoc)
     * @see com.qccx.ueuo.selfguide.service.UserService#addUser(com.qccx.ueuo.selfguide.entity.User)
     */
    @Override
    public int addUser( User user )
    {
        // TODO Auto-generated method stub
        return 0;
    }

    /* (non-Javadoc)
     * @see com.qccx.ueuo.selfguide.service.UserService#deleteUserById(int)
     */
    @Override
    public boolean deleteUserById( int id )
    {
        // TODO Auto-generated method stub
        return false;
    }

    /* (non-Javadoc)
     * @see com.qccx.ueuo.selfguide.service.UserService#updateUser(com.qccx.ueuo.selfguide.entity.User)
     */
    @Override
    public int updateUser( User user )
    {
        // TODO Auto-generated method stub
        return 0;
    }

    /* (non-Javadoc)
     * @see com.qccx.ueuo.selfguide.service.UserService#queryAllUser()
     */
    @Override
    public List<User> queryAllUser()
    {
        return this.getUserDao().queryAllUser();
    }

    /* (non-Javadoc)
     * @see com.qccx.ueuo.selfguide.service.UserService#queryUserById(int)
     */
    @Override
    public User queryUserById( int id )
    {
        // TODO Auto-generated method stub
        return null;
    }
    
    public UserDao getUserDao()
    {
        return userDao;
    }

    public void setUserDao( UserDao userDao )
    {
        this.userDao = userDao;
    }

    /* (non-Javadoc)
     * @see com.qccx.ueuo.selfguide.service.UserService#queryUserById(java.lang.String)
     */
    @Override
    public User queryUserByName(User user) throws SQLException    {
        return getUserDao().queryUserByName(user);
    }
}
